]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
baseAppView: Destroy icon when removing
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Thu, 21 Nov 2019 21:21:44 +0000 (18:21 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Thu, 21 Nov 2019 22:28:46 +0000 (22:28 +0000)
We cannot rely on the garbage collector to do that in a timely
manner, so destroy it explicitly.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/841

js/ui/appDisplay.js

index a49ebe09a899cab1df0ccaee0788e56eb9870d8b..5b9d4d87fa70c8b3b8a6d9db2e91f950836afaa1 100644 (file)
@@ -186,10 +186,11 @@ var BaseAppView = GObject.registerClass({
         // Remove old app icons
         removedApps.forEach(icon => {
             let iconIndex = this._allItems.indexOf(icon);
+            let id = icon.id;
 
             this._allItems.splice(iconIndex, 1);
-            this._grid.removeItem(icon);
-            delete this._items[icon.id];
+            icon.destroy();
+            delete this._items[id];
         });
 
         // Add new app icons